package com.unswift.window.undo;

public class UndoAction {
	
	public final static String ACTION_FIRST="first";
	public final static String ACTION_INSERT="insert";
	public final static String ACTION_REMOVE="remove";

	private String action;
	private Integer offset;
	private Integer length;
	private String text;
	public UndoAction(String action, Integer offset, Integer length, String text) {
		this.action = action;
		this.offset = offset;
		this.length = length;
		this.text = text;
	}
	public String getAction() {
		return action;
	}
	public void setAction(String action) {
		this.action = action;
	}
	public Integer getOffset() {
		return offset;
	}
	public void setOffset(Integer offset) {
		this.offset = offset;
	}
	public Integer getLength() {
		return length;
	}
	public void setLength(Integer length) {
		this.length = length;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	@Override
	public String toString() {
		return action+":"+offset+":"+length+":"+text;
	}
}
